package com.uzai.console.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.uzai.console.dto.tb.tbpunishorder.TbPunishOrderQuery;
import com.uzai.console.entity.TbPunishOrder;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

@Repository
public interface TbPunishOrderMapper {
    int deleteById(@Param("id") Long id, @Param("merId") Long merId);

    int deleteBeforeDay(@Param("beforeDay") Integer beforeDay, @Param("merId") Long merId);

    int insert(TbPunishOrder record);

    int insertSelective(TbPunishOrder record);

    TbPunishOrder selectById(@Param("id") Long id, @Param("merId") Long merId);

    TbPunishOrder selectByTbTradeId(@Param("tbTradeId") String tbTradeId, @Param("merId") Long merId);


    int updateByIdSelective(TbPunishOrder record);

    int updateById(TbPunishOrder record);

    /**
     * 分页查询
     * @param page
     * @param query
     * @return
     */
    ArrayList<TbPunishOrder> findByList(Page<TbPunishOrder> page, @Param("query") TbPunishOrderQuery query);

    /**
     * 查询所有
     * @param query
     * @return
     */
    ArrayList<TbPunishOrder> findByList(@Param("query") TbPunishOrderQuery query);


}